package JavaSE.FileLearning.CoptTest;
import java.io.*;

/**
 *  测试 使用字节流复制文本 音频
 */
public class Test {
    public static void main(String[] args) throws IOException {
        File pathname = new File("D:\\JAVA Projects\\Idea2018\\src\\JavaSE.FileLearning.CoptTest");
        File a = new File(pathname, "\\a.mp3");
        File b = new File(pathname, "\\b.mp3");
        FileInputStream fis = new FileInputStream(a);
        FileOutputStream fos = new FileOutputStream(b,true);
        byte[] bytes = new byte[1024];
        int len = 0;
        while((len = fis.read(bytes)) != -1) {
            fos.write(bytes,0,len);
        }
    }
}
